package com.woniushop.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

public class MyRequsetWrapper extends HttpServletRequestWrapper {
	private HttpServletRequest request;

	public MyRequsetWrapper(HttpServletRequest request) {
		super(request);
		this.request = request;
	}

	@Override
	public String getParameter(String name) {
		String data = request.getParameter(name);
		if (data == null || data.trim().equals("")) {
			return null;
		}else if (name.equals("description")) {
			return data;
		}
		data = data.replaceAll("<", "&lt");
		data = data.replaceAll(">", "&gt");
		return data;
	}
}
